<template>
	<view class="container padding-bj">
		<rich-text :nodes="data.content"></rich-text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: {},
			};
		},
		onLoad(e) {
			// 来自 user/aboutOur 的数据
			let channel = this.getOpenerEventChannel();
			// console.log('channel', channel)
			channel.on('agreementData', (data) => {
				console.log('data', data)
				//详情正则
				data.content = data.content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, (match,
					capture) => {
					var img =
						`<img style="display: block; max-width: 100%;" src="${this.$wanlshop.oss(capture, 500, 0)}">`;
					return img;
				});
				this.data = data;
				this.$wanlshop.title(data.title);
			});
		}
	}
</script>

<style>
</style>